<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>nih: linalg/vector.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">nih
   &#160;<span id="projectnumber">0.5</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('vector_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">linalg/vector.h</div>  </div>
</div>
<div class="contents">
<a href="vector_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright (c) 2010-2011, NVIDIA Corporation</span>
<a name="l00003"></a>00003 <span class="comment"> * All rights reserved.</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span>
<a name="l00006"></a>00006 <span class="comment"> * modification, are permitted provided that the following conditions are met:</span>
<a name="l00007"></a>00007 <span class="comment"> *   * Redistributions of source code must retain the above copyright</span>
<a name="l00008"></a>00008 <span class="comment"> *     notice, this list of conditions and the following disclaimer.</span>
<a name="l00009"></a>00009 <span class="comment"> *   * Redistributions in binary form must reproduce the above copyright</span>
<a name="l00010"></a>00010 <span class="comment"> *     notice, this list of conditions and the following disclaimer in the</span>
<a name="l00011"></a>00011 <span class="comment"> *     documentation and/or other materials provided with the distribution.</span>
<a name="l00012"></a>00012 <span class="comment"> *   * Neither the name of NVIDIA Corporation nor the</span>
<a name="l00013"></a>00013 <span class="comment"> *     names of its contributors may be used to endorse or promote products</span>
<a name="l00014"></a>00014 <span class="comment"> *     derived from this software without specific prior written permission.</span>
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND</span>
<a name="l00017"></a>00017 <span class="comment"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span>
<a name="l00018"></a>00018 <span class="comment"> * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span>
<a name="l00019"></a>00019 <span class="comment"> * DISCLAIMED. IN NO EVENT SHALL &lt;COPYRIGHT HOLDER&gt; BE LIABLE FOR ANY</span>
<a name="l00020"></a>00020 <span class="comment"> * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span>
<a name="l00021"></a>00021 <span class="comment"> * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span>
<a name="l00022"></a>00022 <span class="comment"> * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span>
<a name="l00023"></a>00023 <span class="comment"> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span>
<a name="l00024"></a>00024 <span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span>
<a name="l00025"></a>00025 <span class="comment"> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027 
<a name="l00032"></a>00032 <span class="preprocessor">#pragma once</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;nih/basic/types.h&gt;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;nih/basic/numbers.h&gt;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00037"></a>00037 <span class="preprocessor">#include &lt;algorithm&gt;</span>
<a name="l00038"></a>00038 <span class="preprocessor">#include &lt;cmath&gt;</span>
<a name="l00039"></a>00039 
<a name="l00040"></a>00040 <span class="keyword">namespace </span>nih {
<a name="l00041"></a>00041 
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 
<a name="l00052"></a>00052 
<a name="l00053"></a>00053 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00054"></a><a class="code" href="structnih_1_1_vector.html">00054</a> <span class="keyword">struct </span><a class="code" href="structnih_1_1_vector.html">Vector</a>
<a name="l00055"></a>00055 {
<a name="l00056"></a>00056         <span class="keyword">typedef</span> T           value_type;
<a name="l00057"></a>00057         <span class="keyword">typedef</span> T           Field_type;
<a name="l00058"></a>00058         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> kDimension = DIM;
<a name="l00059"></a>00059 
<a name="l00062"></a><a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">00062</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">Vector</a>() {}
<a name="l00063"></a>00063 
<a name="l00067"></a><a class="code" href="structnih_1_1_vector.html#a3129b3fa855de8ba4df656ea0bb72749">00067</a>     NIH_HOST NIH_DEVICE FORCE_INLINE <span class="keyword">explicit</span> <a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">Vector</a>(<span class="keyword">const</span> T v)
<a name="l00068"></a>00068         {
<a name="l00069"></a>00069                 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; kDimension; i++)
<a name="l00070"></a>00070                         x[i] = v;
<a name="l00071"></a>00071         }
<a name="l00075"></a><a class="code" href="structnih_1_1_vector.html#adbcc5ccb3416111f772f270d47b31286">00075</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <span class="keyword">explicit</span> <a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">Vector</a>(<span class="keyword">const</span> T* v)
<a name="l00076"></a>00076         {
<a name="l00077"></a>00077                 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; kDimension; i++)
<a name="l00078"></a>00078                         x[i] = v[i];
<a name="l00079"></a>00079         }
<a name="l00084"></a><a class="code" href="structnih_1_1_vector.html#a6ffcf2ddc48e3b7f6386a8fdef1fb1f5">00084</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">Vector</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_vector.html">Vector&lt;T,DIM-1&gt;</a>&amp; v, <span class="keyword">const</span> T w)
<a name="l00085"></a>00085         {
<a name="l00086"></a>00086                 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; DIM-1; i++)
<a name="l00087"></a>00087                         x[i] = v[i];
<a name="l00088"></a>00088 
<a name="l00089"></a>00089                 x[DIM-1] = w;
<a name="l00090"></a>00090         }
<a name="l00091"></a>00091 
<a name="l00095"></a><a class="code" href="structnih_1_1_vector.html#aa0d83cd139256485ae8f163d04386efc">00095</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <a class="code" href="structnih_1_1_vector.html">Vector</a>&amp; <a class="code" href="structnih_1_1_vector.html#aa0d83cd139256485ae8f163d04386efc">operator=</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_vector.html">Vector</a>&amp; v)
<a name="l00096"></a>00096         {
<a name="l00097"></a>00097                 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; kDimension; i++)
<a name="l00098"></a>00098                         x[i] = v.x[i];
<a name="l00099"></a>00099                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00100"></a>00100         }
<a name="l00104"></a><a class="code" href="structnih_1_1_vector.html#a96ed0e3cfa2e5a9985474673e4e8ac32">00104</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <span class="keyword">const</span> T&amp; <a class="code" href="structnih_1_1_vector.html#a96ed0e3cfa2e5a9985474673e4e8ac32">operator[]</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> i)<span class="keyword"> const      </span>{ <span class="keywordflow">return</span> x[i]; }
<a name="l00108"></a><a class="code" href="structnih_1_1_vector.html#a6d5b57f8fead0871a221d43d5e44f5d4">00108</a>         NIH_HOST NIH_DEVICE FORCE_INLINE T&amp; <a class="code" href="structnih_1_1_vector.html#a6d5b57f8fead0871a221d43d5e44f5d4">operator[]</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> i)          { <span class="keywordflow">return</span> x[i]; }
<a name="l00109"></a>00109 
<a name="l00112"></a><a class="code" href="structnih_1_1_vector.html#acc8500e147b270f614715c49b04e333b">00112</a>         NIH_HOST NIH_DEVICE <span class="keywordtype">size_t</span> <a class="code" href="structnih_1_1_vector.html#acc8500e147b270f614715c49b04e333b">dimension</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> kDimension; }
<a name="l00113"></a>00113 
<a name="l00114"></a>00114     <span class="comment">// compatibility with std::vector and sparse/dynamic vectors</span>
<a name="l00115"></a>00115     <span class="keywordtype">void</span> resize(<span class="keyword">const</span> <span class="keywordtype">size_t</span> n) {}
<a name="l00116"></a>00116 
<a name="l00117"></a>00117         T x[DIM];
<a name="l00118"></a>00118 };
<a name="l00119"></a>00119 
<a name="l00120"></a>00120 
<a name="l00124"></a>00124 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00125"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_012_01_4.html">00125</a> <span class="keyword">struct </span><a class="code" href="structnih_1_1_vector.html">Vector</a>&lt;T,2&gt;
<a name="l00126"></a>00126 {
<a name="l00127"></a>00127         <span class="keyword">typedef</span> T           value_type;
<a name="l00128"></a>00128         <span class="keyword">typedef</span> T           Field_type;
<a name="l00129"></a>00129         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> kDimension = 2u;
<a name="l00130"></a>00130 
<a name="l00133"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_012_01_4.html#a0d14da0f64ea711e804cad90fcc14859">00133</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <a class="code" href="structnih_1_1_vector_3_01_t_00_012_01_4.html#a0d14da0f64ea711e804cad90fcc14859">Vector</a>() {}
<a name="l00134"></a>00134 
<a name="l00138"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_012_01_4.html#a690d778950f807362930a6731d053031">00138</a>     NIH_HOST NIH_DEVICE FORCE_INLINE <span class="keyword">explicit</span> <a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">Vector</a>(<span class="keyword">const</span> T v)
<a name="l00139"></a>00139         {
<a name="l00140"></a>00140                 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; kDimension; i++)
<a name="l00141"></a>00141                         x[i] = v;
<a name="l00142"></a>00142         }
<a name="l00146"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_012_01_4.html#a6c3a470babc04a06c4e7cae7817fc9c1">00146</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <span class="keyword">explicit</span> <a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">Vector</a>(<span class="keyword">const</span> T* v)
<a name="l00147"></a>00147         {
<a name="l00148"></a>00148                 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; kDimension; i++)
<a name="l00149"></a>00149                         x[i] = v[i];
<a name="l00150"></a>00150         }
<a name="l00155"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_012_01_4.html#a583d88096e3a36c4fe55c996a73124f9">00155</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">Vector</a>(<span class="keyword">const</span> T v0, <span class="keyword">const</span> T v1)
<a name="l00156"></a>00156         {
<a name="l00157"></a>00157                 x[0] = v0;
<a name="l00158"></a>00158                 x[1] = v1;
<a name="l00159"></a>00159         }
<a name="l00164"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_012_01_4.html#a6faa6aad92bdedf1d965cea57d9c27a9">00164</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">Vector</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_vector.html">Vector&lt;T,1&gt;</a>&amp; v, <span class="keyword">const</span> T v1)
<a name="l00165"></a>00165         {
<a name="l00166"></a>00166                 x[0] = v[0];
<a name="l00167"></a>00167                 x[1] = v1;
<a name="l00168"></a>00168         }
<a name="l00169"></a>00169 
<a name="l00173"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_012_01_4.html#a5642e3babae06f1cde5779ecb97b918f">00173</a>     NIH_HOST NIH_DEVICE FORCE_INLINE <a class="code" href="structnih_1_1_vector.html">Vector</a>&amp; <a class="code" href="structnih_1_1_vector.html#aa0d83cd139256485ae8f163d04386efc">operator=</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_vector.html">Vector</a>&amp; v)
<a name="l00174"></a>00174         {
<a name="l00175"></a>00175                 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; kDimension; i++)
<a name="l00176"></a>00176                         x[i] = v.x[i];
<a name="l00177"></a>00177                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00178"></a>00178         }
<a name="l00182"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_012_01_4.html#aa494f7aa68630cbd253c5f950ea4e976">00182</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <span class="keyword">const</span> T&amp; <a class="code" href="structnih_1_1_vector_3_01_t_00_012_01_4.html#aa494f7aa68630cbd253c5f950ea4e976">operator[]</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> i)<span class="keyword"> const      </span>{ <span class="keywordflow">return</span> x[i]; }
<a name="l00186"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_012_01_4.html#adec475bd0cddb664605c692867b76bd8">00186</a>         NIH_HOST NIH_DEVICE FORCE_INLINE T&amp; <a class="code" href="structnih_1_1_vector_3_01_t_00_012_01_4.html#adec475bd0cddb664605c692867b76bd8">operator[]</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> i)          { <span class="keywordflow">return</span> x[i]; }
<a name="l00187"></a>00187 
<a name="l00190"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_012_01_4.html#a054b3ba0ffc424c497deb234fe6a7c7a">00190</a>         NIH_HOST NIH_DEVICE <span class="keywordtype">size_t</span> <a class="code" href="structnih_1_1_vector_3_01_t_00_012_01_4.html#a054b3ba0ffc424c497deb234fe6a7c7a">dimension</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> kDimension; }
<a name="l00191"></a>00191 
<a name="l00192"></a>00192         T x[2];
<a name="l00193"></a>00193 };
<a name="l00197"></a>00197 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00198"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_013_01_4.html">00198</a> <span class="keyword">struct </span><a class="code" href="structnih_1_1_vector.html">Vector</a>&lt;T,3&gt;
<a name="l00199"></a>00199 {
<a name="l00200"></a>00200         <span class="keyword">typedef</span> T           value_type;
<a name="l00201"></a>00201         <span class="keyword">typedef</span> T           Field_type;
<a name="l00202"></a>00202         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> kDimension = 3u;
<a name="l00203"></a>00203 
<a name="l00206"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_013_01_4.html#a46f3c02e790ef9ede9362a4800abecf8">00206</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <a class="code" href="structnih_1_1_vector_3_01_t_00_013_01_4.html#a46f3c02e790ef9ede9362a4800abecf8">Vector</a>() {}
<a name="l00207"></a>00207 
<a name="l00211"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_013_01_4.html#a1fa5583b1b796dba60cf0c9fa7ca472d">00211</a>     NIH_HOST NIH_DEVICE FORCE_INLINE <span class="keyword">explicit</span> <a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">Vector</a>(<span class="keyword">const</span> T v)
<a name="l00212"></a>00212         {
<a name="l00213"></a>00213                 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; kDimension; i++)
<a name="l00214"></a>00214                         x[i] = v;
<a name="l00215"></a>00215         }
<a name="l00219"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_013_01_4.html#ad44c24f5b05234e9cde8c07c0c070ca6">00219</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <span class="keyword">explicit</span> <a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">Vector</a>(<span class="keyword">const</span> T* v)
<a name="l00220"></a>00220         {
<a name="l00221"></a>00221                 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; kDimension; i++)
<a name="l00222"></a>00222                         x[i] = v[i];
<a name="l00223"></a>00223         }
<a name="l00229"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_013_01_4.html#a95ed63724e926d12ea0c47e5be1c5a72">00229</a>     NIH_HOST NIH_DEVICE FORCE_INLINE <a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">Vector</a>(<span class="keyword">const</span> T v0, <span class="keyword">const</span> T v1, <span class="keyword">const</span> T v2)
<a name="l00230"></a>00230         {
<a name="l00231"></a>00231                 x[0] = v0;
<a name="l00232"></a>00232                 x[1] = v1;
<a name="l00233"></a>00233                 x[2] = v2;
<a name="l00234"></a>00234         }
<a name="l00239"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_013_01_4.html#abb5a3d675c027f8f795883475f7c8c0b">00239</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">Vector</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_vector_3_01_t_00_012_01_4.html">Vector&lt;T,2&gt;</a>&amp; v, <span class="keyword">const</span> T v2)
<a name="l00240"></a>00240         {
<a name="l00241"></a>00241                 x[0] = v[0];
<a name="l00242"></a>00242                 x[1] = v[1];
<a name="l00243"></a>00243                 x[2] = v2;
<a name="l00244"></a>00244         }
<a name="l00245"></a>00245 
<a name="l00249"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_013_01_4.html#a3bec2a9796b619173e3776b23a2f08b7">00249</a>     NIH_HOST NIH_DEVICE FORCE_INLINE <a class="code" href="structnih_1_1_vector.html">Vector</a>&amp; <a class="code" href="structnih_1_1_vector.html#aa0d83cd139256485ae8f163d04386efc">operator=</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_vector.html">Vector</a>&amp; v)
<a name="l00250"></a>00250         {
<a name="l00251"></a>00251                 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; kDimension; i++)
<a name="l00252"></a>00252                         x[i] = v.x[i];
<a name="l00253"></a>00253                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00254"></a>00254         }
<a name="l00258"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_013_01_4.html#af2d4000a3a863988f6e583eb30107d3f">00258</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <span class="keyword">const</span> T&amp; <a class="code" href="structnih_1_1_vector_3_01_t_00_013_01_4.html#af2d4000a3a863988f6e583eb30107d3f">operator[]</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> i)<span class="keyword"> const      </span>{ <span class="keywordflow">return</span> x[i]; }
<a name="l00262"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_013_01_4.html#a64ad5a39c5b1c9971b8dd7270f7a5710">00262</a>         NIH_HOST NIH_DEVICE FORCE_INLINE T&amp; <a class="code" href="structnih_1_1_vector_3_01_t_00_013_01_4.html#a64ad5a39c5b1c9971b8dd7270f7a5710">operator[]</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> i)          { <span class="keywordflow">return</span> x[i]; }
<a name="l00263"></a>00263 
<a name="l00266"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_013_01_4.html#ac80e01ef9cbb7ff22bd61c8a84e20137">00266</a>         NIH_HOST NIH_DEVICE <span class="keywordtype">size_t</span> <a class="code" href="structnih_1_1_vector_3_01_t_00_013_01_4.html#ac80e01ef9cbb7ff22bd61c8a84e20137">dimension</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> kDimension; }
<a name="l00267"></a>00267 
<a name="l00268"></a>00268         T x[3];
<a name="l00269"></a>00269 };
<a name="l00270"></a>00270 
<a name="l00274"></a>00274 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00275"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_014_01_4.html">00275</a> <span class="keyword">struct </span><a class="code" href="structnih_1_1_vector.html">Vector</a>&lt;T,4&gt;
<a name="l00276"></a>00276 {
<a name="l00277"></a>00277         <span class="keyword">typedef</span> T           value_type;
<a name="l00278"></a>00278         <span class="keyword">typedef</span> T           Field_type;
<a name="l00279"></a>00279         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> kDimension = 4u;
<a name="l00280"></a>00280 
<a name="l00283"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_014_01_4.html#a82429e0bb31f121a4787a4831211ff3e">00283</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <a class="code" href="structnih_1_1_vector_3_01_t_00_014_01_4.html#a82429e0bb31f121a4787a4831211ff3e">Vector</a>() {}
<a name="l00287"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_014_01_4.html#aeadd1de1e7d8f6c6f0b9eae4df2139ac">00287</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <span class="keyword">explicit</span> <a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">Vector</a>(<span class="keyword">const</span> T v)
<a name="l00288"></a>00288         {
<a name="l00289"></a>00289                 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; kDimension; i++)
<a name="l00290"></a>00290                         x[i] = v;
<a name="l00291"></a>00291         }
<a name="l00295"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_014_01_4.html#aa1df296862a41b5ede04d4cfaa928ed5">00295</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <span class="keyword">explicit</span> <a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">Vector</a>(<span class="keyword">const</span> T* v)
<a name="l00296"></a>00296         {
<a name="l00297"></a>00297                 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; kDimension; i++)
<a name="l00298"></a>00298                         x[i] = v[i];
<a name="l00299"></a>00299         }
<a name="l00306"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_014_01_4.html#a274c16835493414f7ab7d435ebac1cb1">00306</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">Vector</a>(<span class="keyword">const</span> T v0, <span class="keyword">const</span> T v1, <span class="keyword">const</span> T v2, <span class="keyword">const</span> T v3)
<a name="l00307"></a>00307         {
<a name="l00308"></a>00308                 x[0] = v0;
<a name="l00309"></a>00309                 x[1] = v1;
<a name="l00310"></a>00310                 x[2] = v2;
<a name="l00311"></a>00311                 x[3] = v3;
<a name="l00312"></a>00312         }
<a name="l00317"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_014_01_4.html#a7dabe8e209dda0aa14af8d5e824512f2">00317</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <a class="code" href="structnih_1_1_vector.html#af5110044ef547d0f5bc45a41bf6f969f">Vector</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_vector_3_01_t_00_013_01_4.html">Vector&lt;T,3&gt;</a>&amp; v, <span class="keyword">const</span> T v3)
<a name="l00318"></a>00318         {
<a name="l00319"></a>00319                 x[0] = v[0];
<a name="l00320"></a>00320                 x[1] = v[1];
<a name="l00321"></a>00321                 x[2] = v[2];
<a name="l00322"></a>00322                 x[3] = v3;
<a name="l00323"></a>00323         }
<a name="l00324"></a>00324 
<a name="l00328"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_014_01_4.html#a6a9e8b8320ccad22784092b356ee71be">00328</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <a class="code" href="structnih_1_1_vector.html">Vector</a>&amp; <a class="code" href="structnih_1_1_vector.html#aa0d83cd139256485ae8f163d04386efc">operator=</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_vector.html">Vector</a>&amp; v)
<a name="l00329"></a>00329         {
<a name="l00330"></a>00330                 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; kDimension; i++)
<a name="l00331"></a>00331                         x[i] = v.x[i];
<a name="l00332"></a>00332                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00333"></a>00333         }
<a name="l00334"></a>00334 
<a name="l00338"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_014_01_4.html#a45925acf4614936d4ed2cf9b84d584dd">00338</a>         NIH_HOST NIH_DEVICE FORCE_INLINE <span class="keyword">const</span> T&amp; <a class="code" href="structnih_1_1_vector_3_01_t_00_014_01_4.html#a45925acf4614936d4ed2cf9b84d584dd">operator[]</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> i)<span class="keyword"> const      </span>{ <span class="keywordflow">return</span> x[i]; }
<a name="l00342"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_014_01_4.html#a79ccc160edf52ff5892a9f7f7c6e54d3">00342</a>         NIH_HOST NIH_DEVICE FORCE_INLINE T&amp; <a class="code" href="structnih_1_1_vector_3_01_t_00_014_01_4.html#a79ccc160edf52ff5892a9f7f7c6e54d3">operator[]</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> i)          { <span class="keywordflow">return</span> x[i]; }
<a name="l00343"></a>00343 
<a name="l00346"></a><a class="code" href="structnih_1_1_vector_3_01_t_00_014_01_4.html#a22ae136785aff83dfc54b743ceeeacba">00346</a>         NIH_HOST NIH_DEVICE <span class="keywordtype">size_t</span> <a class="code" href="structnih_1_1_vector_3_01_t_00_014_01_4.html#a22ae136785aff83dfc54b743ceeeacba">dimension</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> kDimension; }
<a name="l00347"></a>00347 
<a name="l00348"></a>00348         T x[4];
<a name="l00349"></a>00349 };
<a name="l00350"></a>00350 
<a name="l00354"></a>00354 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00355"></a>00355 FORCE_INLINE NIH_HOST_DEVICE Vector&lt;T,2&gt; <a class="code" href="group__vectors.html#gab815e30e4a8c47b3ff177de0ba4162cb">xy</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op);
<a name="l00356"></a>00356 
<a name="l00360"></a>00360 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00361"></a>00361 FORCE_INLINE NIH_HOST_DEVICE Vector&lt;T,2&gt; <a class="code" href="group__vectors.html#gaa33a532874bb7f0c3977391f83dc64a3">yx</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op);
<a name="l00362"></a>00362 
<a name="l00366"></a>00366 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00367"></a>00367 FORCE_INLINE NIH_HOST_DEVICE Vector&lt;T,3&gt; <a class="code" href="group__vectors.html#ga283f58e199d448be6746baec9dec6ac1">xyz</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op);
<a name="l00368"></a>00368 
<a name="l00372"></a>00372 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00373"></a>00373 FORCE_INLINE NIH_HOST_DEVICE Vector&lt;T,3&gt; <a class="code" href="group__vectors.html#ga789568ee5abe245a1789c972459d9208">xzy</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op);
<a name="l00374"></a>00374 
<a name="l00378"></a>00378 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00379"></a>00379 FORCE_INLINE NIH_HOST_DEVICE Vector&lt;T,3&gt; <a class="code" href="group__vectors.html#ga8ba75af33f38985f639aa3f3abe0dce2">zyx</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op);
<a name="l00380"></a>00380 
<a name="l00384"></a>00384 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00385"></a>00385 FORCE_INLINE NIH_HOST_DEVICE Vector&lt;T,3&gt; <a class="code" href="group__vectors.html#ga531fcf7af9a93262536231c3fb69cb4f">zxy</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op);
<a name="l00386"></a>00386 
<a name="l00390"></a>00390 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00391"></a>00391 FORCE_INLINE NIH_HOST_DEVICE Vector&lt;T,3&gt; <a class="code" href="group__vectors.html#gaacc6c8319788b93e1cf61288299530ca">yxz</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op);
<a name="l00392"></a>00392 
<a name="l00396"></a>00396 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00397"></a>00397 FORCE_INLINE NIH_HOST_DEVICE Vector&lt;T,3&gt; <a class="code" href="group__vectors.html#ga5bae4031dc463ce54993a932a5671a17">yzx</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op);
<a name="l00398"></a>00398 
<a name="l00403"></a>00403 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00404"></a>00404 NIH_HOST NIH_DEVICE <span class="keywordtype">bool</span> <a class="code" href="group__vectors.html#gaabd17838f41c1637cb84a3cfe31dfb0b">operator==</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op2);
<a name="l00405"></a>00405 
<a name="l00410"></a>00410 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00411"></a>00411 NIH_HOST NIH_DEVICE <span class="keywordtype">bool</span> <a class="code" href="group__vectors.html#ga884852dfe6e126e524af6c966fd3fa8e">operator!=</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op2);
<a name="l00412"></a>00412 
<a name="l00417"></a>00417 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00418"></a>00418 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt; operator*(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> T op2);
<a name="l00419"></a>00419 
<a name="l00424"></a>00424 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00425"></a>00425 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt; <a class="code" href="group__vectors.html#gafe00990ed787cec75b986c394b7f5e0f">operator/</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> T op2);
<a name="l00426"></a>00426 
<a name="l00431"></a>00431 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00432"></a>00432 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt; operator*(<span class="keyword">const</span> T op1, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op2);
<a name="l00433"></a>00433 
<a name="l00438"></a>00438 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00439"></a>00439 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt;&amp; <a class="code" href="group__vectors.html#gabaaa34dafadbdbaaff130b02d28b3ad1">operator*=</a>(Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> T op2);
<a name="l00440"></a>00440 
<a name="l00445"></a>00445 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00446"></a>00446 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt; <a class="code" href="group__vectors.html#ga9235b9ea803b8d0ef379565a3ff7dd76">operator+</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op2);
<a name="l00447"></a>00447 
<a name="l00452"></a>00452 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00453"></a>00453 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt; <a class="code" href="group__vectors.html#ga8782aba246b1da852d9f4390d22336f8">operator-</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op2);
<a name="l00454"></a>00454 
<a name="l00459"></a>00459 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00460"></a>00460 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt; operator*(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op2);
<a name="l00461"></a>00461 
<a name="l00466"></a>00466 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00467"></a>00467 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt; <a class="code" href="group__vectors.html#gafe00990ed787cec75b986c394b7f5e0f">operator/</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op2);
<a name="l00468"></a>00468 
<a name="l00473"></a>00473 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00474"></a>00474 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt;&amp; <a class="code" href="group__vectors.html#ga4226e5c3bf0305cf0a0459bf43564223">operator+=</a>(Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op2);
<a name="l00475"></a>00475 
<a name="l00480"></a>00480 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00481"></a>00481 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt;&amp; <a class="code" href="group__vectors.html#ga6c534bcb2f6acc627ea0988b2de4f73e">operator-=</a>(Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op2);
<a name="l00482"></a>00482 
<a name="l00487"></a>00487 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00488"></a>00488 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt;&amp; <a class="code" href="group__vectors.html#gabaaa34dafadbdbaaff130b02d28b3ad1">operator*=</a>(Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op2);
<a name="l00489"></a>00489 
<a name="l00494"></a>00494 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00495"></a>00495 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt;&amp; <a class="code" href="group__vectors.html#ga04e63000d70a03c13098b6b7303a29e9">operator/=</a>(Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op2);
<a name="l00496"></a>00496 
<a name="l00501"></a>00501 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00502"></a>00502 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt;&amp; <a class="code" href="group__vectors.html#ga04e63000d70a03c13098b6b7303a29e9">operator/=</a>(Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> T op2);
<a name="l00503"></a>00503 
<a name="l00507"></a>00507 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00508"></a>00508 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt; <a class="code" href="group__vectors.html#ga8782aba246b1da852d9f4390d22336f8">operator-</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op1);
<a name="l00509"></a>00509 
<a name="l00513"></a>00513 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00514"></a>00514 NIH_HOST NIH_DEVICE FORCE_INLINE T <a class="code" href="group__vectors.html#ga0de5bc91fec52d0b92e059ebf5d389ec">intensity</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; v);
<a name="l00515"></a>00515 
<a name="l00519"></a>00519 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00520"></a>00520 NIH_HOST NIH_DEVICE FORCE_INLINE T <a class="code" href="group__vectors.html#ga0de5bc91fec52d0b92e059ebf5d389ec">intensity</a>(<span class="keyword">const</span> T v);
<a name="l00521"></a>00521 
<a name="l00526"></a>00526 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00527"></a>00527 NIH_HOST NIH_DEVICE FORCE_INLINE T <a class="code" href="group__vectors.html#ga299bb7e770db20680a383864db4bd843">dot</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op2);
<a name="l00528"></a>00528 
<a name="l00533"></a>00533 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00534"></a>00534 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,3u&gt; <a class="code" href="group__vectors.html#ga14de1c4465c863797732d372f933a932">cross</a>(<span class="keyword">const</span> Vector&lt;T,3u&gt;&amp; op1, <span class="keyword">const</span> Vector&lt;T,3u&gt;&amp; op2);
<a name="l00535"></a>00535 
<a name="l00540"></a>00540 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00541"></a>00541 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,3&gt; <a class="code" href="group__vectors.html#ga45b100c1ab0f691ea58662e70c0801c3">reflect</a>(<span class="keyword">const</span> Vector&lt;T,3&gt; I, <span class="keyword">const</span> Vector&lt;T,3&gt; N);
<a name="l00542"></a>00542 
<a name="l00546"></a>00546 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00547"></a>00547 NIH_HOST NIH_DEVICE Vector&lt;T,3&gt; <a class="code" href="group__vectors.html#gac2324a31b7a178eaea07e98f0b13f292">orthogonal</a>(<span class="keyword">const</span> Vector&lt;T,3&gt; v);
<a name="l00548"></a>00548 
<a name="l00553"></a>00553 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00554"></a>00554 NIH_HOST NIH_DEVICE FORCE_INLINE T <a class="code" href="group__vectors.html#gad840e1ac601434335deb2ac40bdf71dc">euclidean_distance</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op2);
<a name="l00555"></a>00555 
<a name="l00560"></a>00560 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00561"></a>00561 NIH_HOST NIH_DEVICE FORCE_INLINE T <a class="code" href="group__vectors.html#ga21d1cd79e48416f289f7b0e55f3b32dc">square_euclidean_distance</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op1, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op2);
<a name="l00562"></a>00562 
<a name="l00566"></a>00566 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00567"></a>00567 NIH_HOST NIH_DEVICE FORCE_INLINE T <a class="code" href="group__vectors.html#gaef3221bb95a71d1743f7df1673082cbf">norm</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op);
<a name="l00568"></a>00568 
<a name="l00572"></a>00572 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00573"></a>00573 NIH_HOST NIH_DEVICE FORCE_INLINE T <a class="code" href="group__vectors.html#ga9c4ac20ce07631b820678349b4c46698">sq_norm</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; op);
<a name="l00574"></a>00574 
<a name="l00578"></a>00578 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00579"></a>00579 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt; <a class="code" href="group__vectors.html#gae244399ef06f44b09f0a908aa406c037">normalize</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt; v);
<a name="l00580"></a>00580 
<a name="l00584"></a>00584 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00585"></a>00585 NIH_HOST NIH_DEVICE FORCE_INLINE T <a class="code" href="group__vectors.html#ga643f06fe0c1d7d9d1ae9fe81e61c389e">min_comp</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; v);
<a name="l00586"></a>00586 
<a name="l00590"></a>00590 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00591"></a>00591 NIH_HOST NIH_DEVICE FORCE_INLINE T <a class="code" href="group__vectors.html#gab4b34a60142a60bb290dfba1709c85f4">max_comp</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; v);
<a name="l00592"></a>00592 
<a name="l00596"></a>00596 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00597"></a>00597 NIH_HOST NIH_DEVICE FORCE_INLINE T <a class="code" href="group__vectors.html#ga643f06fe0c1d7d9d1ae9fe81e61c389e">min_comp</a>(<span class="keyword">const</span> Vector&lt;T,3&gt;&amp; v);
<a name="l00598"></a>00598 
<a name="l00602"></a>00602 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00603"></a>00603 NIH_HOST NIH_DEVICE FORCE_INLINE T <a class="code" href="group__vectors.html#gab4b34a60142a60bb290dfba1709c85f4">max_comp</a>(<span class="keyword">const</span> Vector&lt;T,3&gt;&amp; v);
<a name="l00604"></a>00604 
<a name="l00608"></a>00608 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00609"></a>00609 NIH_HOST NIH_DEVICE FORCE_INLINE uint32 <a class="code" href="group__vectors.html#ga549a2d3c8b77b652dc1cd56c1d119b77">max_element</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; v);
<a name="l00610"></a>00610 
<a name="l00615"></a>00615 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00616"></a>00616 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt; <a class="code" href="group__vectors.html#ga5809911d15c32de18955c59865379695">min</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; v1, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; v2);
<a name="l00617"></a>00617 
<a name="l00622"></a>00622 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00623"></a>00623 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt; <a class="code" href="group__vectors.html#gab2b34b1991185fc29890973777b60e54">max</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; v1, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; v2);
<a name="l00624"></a>00624 
<a name="l00628"></a>00628 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00629"></a>00629 NIH_HOST NIH_DEVICE FORCE_INLINE uint32 <a class="code" href="group__vectors.html#ga22cda565844e9049dd1438a376c2e198" title="compute the largest dimension of a given vector">largest_dim</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; v);
<a name="l00630"></a>00630 
<a name="l00635"></a>00635 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00636"></a>00636 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt; <a class="code" href="group__vectors.html#ga396a9bd50b2cf3f00afd4f806ce544f3" title="return a normal facing in the opposite direction wrt the view vector">face_forward</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; n, <span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; view);
<a name="l00637"></a>00637 
<a name="l00642"></a>00642 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00643"></a>00643 NIH_HOST NIH_DEVICE FORCE_INLINE Vector&lt;T,DIM&gt; <a class="code" href="group__vectors.html#ga278bc40e135ff21dd4c80375feccc703" title="compute the modulus of a vector">mod</a>(<span class="keyword">const</span> Vector&lt;T,DIM&gt;&amp; v, <span class="keyword">const</span> <span class="keywordtype">float</span> m);
<a name="l00644"></a>00644 
<a name="l00645"></a>00645 <span class="keyword">typedef</span> Vector&lt;float,2&gt; Vector2f;
<a name="l00646"></a>00646 <span class="keyword">typedef</span> Vector&lt;float,3&gt; Vector3f;
<a name="l00647"></a>00647 <span class="keyword">typedef</span> Vector&lt;float,4&gt; Vector4f;
<a name="l00648"></a>00648 <span class="keyword">typedef</span> Vector&lt;double,2&gt; Vector2d;
<a name="l00649"></a>00649 <span class="keyword">typedef</span> Vector&lt;double,3&gt; Vector3d;
<a name="l00650"></a>00650 <span class="keyword">typedef</span> Vector&lt;double,4&gt; Vector4d;
<a name="l00651"></a>00651 <span class="keyword">typedef</span> Vector&lt;int32,2&gt; Vector2i;
<a name="l00652"></a>00652 <span class="keyword">typedef</span> Vector&lt;int32,3&gt; Vector3i;
<a name="l00653"></a>00653 <span class="keyword">typedef</span> Vector&lt;int32,4&gt; Vector4i;
<a name="l00654"></a>00654 
<a name="l00655"></a>00655 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00656"></a><a class="code" href="structnih_1_1_vector__traits.html">00656</a> <span class="keyword">struct </span><a class="code" href="structnih_1_1_vector__traits.html">Vector_traits</a>
<a name="l00657"></a>00657 {
<a name="l00658"></a>00658         <span class="keyword">typedef</span> T Field_type;
<a name="l00659"></a>00659         <span class="keyword">typedef</span> T value_type;
<a name="l00660"></a>00660 };
<a name="l00661"></a>00661 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00662"></a><a class="code" href="structnih_1_1_vector__traits_3_01_t_01_5_01_4.html">00662</a> <span class="keyword">struct </span><a class="code" href="structnih_1_1_vector__traits.html">Vector_traits</a>&lt;T*&gt;
<a name="l00663"></a>00663 {
<a name="l00664"></a>00664         <span class="keyword">typedef</span> T Field_type;
<a name="l00665"></a>00665         <span class="keyword">typedef</span> T value_type;
<a name="l00666"></a>00666 };
<a name="l00667"></a>00667 
<a name="l00668"></a>00668 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00669"></a><a class="code" href="structnih_1_1_vector__traits_3_01_vector_3_01_t_00_01_d_i_m_01_4_01_4.html">00669</a> <span class="keyword">struct </span><a class="code" href="structnih_1_1_vector__traits.html">Vector_traits</a>&lt; <a class="code" href="structnih_1_1_vector.html">Vector</a>&lt;T,DIM&gt; &gt;
<a name="l00670"></a>00670 {
<a name="l00671"></a>00671         <span class="keyword">typedef</span> T Field_type;
<a name="l00672"></a>00672     <span class="keyword">typedef</span> T value_type;
<a name="l00673"></a>00673 };
<a name="l00674"></a>00674 
<a name="l00678"></a>00678 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00679"></a><a class="code" href="structnih_1_1_dynamic__vector.html">00679</a> <span class="keyword">struct </span><a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector</a>
<a name="l00680"></a>00680 {
<a name="l00681"></a>00681         <span class="keyword">typedef</span> T           value_type;
<a name="l00682"></a>00682         <span class="keyword">typedef</span> T           Field_type;
<a name="l00683"></a>00683 
<a name="l00686"></a><a class="code" href="structnih_1_1_dynamic__vector.html#a78352151ab2fec1cec4024ee211454a9">00686</a>         NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html#a78352151ab2fec1cec4024ee211454a9">Dynamic_vector</a>() {}
<a name="l00687"></a>00687 
<a name="l00691"></a><a class="code" href="structnih_1_1_dynamic__vector.html#a434b9fa69facf06fb9122a059461c000">00691</a>     NIH_HOST <span class="keyword">explicit</span> <a class="code" href="structnih_1_1_dynamic__vector.html#a434b9fa69facf06fb9122a059461c000">Dynamic_vector</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> dim) : x( dim ) {}
<a name="l00692"></a>00692 
<a name="l00697"></a><a class="code" href="structnih_1_1_dynamic__vector.html#a980af6ce6af2d60e65878638c6da5d51">00697</a>     NIH_HOST <a class="code" href="structnih_1_1_dynamic__vector.html#a980af6ce6af2d60e65878638c6da5d51">Dynamic_vector</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> dim, <span class="keyword">const</span> T v) : x( dim, v ) {}
<a name="l00698"></a>00698 
<a name="l00703"></a><a class="code" href="structnih_1_1_dynamic__vector.html#a6d43a42828024ae13a6e07387a45c6de">00703</a>     NIH_HOST <a class="code" href="structnih_1_1_dynamic__vector.html#a78352151ab2fec1cec4024ee211454a9">Dynamic_vector</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> dim, <span class="keyword">const</span> T* v) :
<a name="l00704"></a>00704         x( dim )
<a name="l00705"></a>00705         {
<a name="l00706"></a>00706                 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; dim; i++)
<a name="l00707"></a>00707                         x[i] = v[i];
<a name="l00708"></a>00708         }
<a name="l00712"></a><a class="code" href="structnih_1_1_dynamic__vector.html#a489efffc6e5af45d78277bfdd9e4e0f0">00712</a>     NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html#a489efffc6e5af45d78277bfdd9e4e0f0">Dynamic_vector</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector</a>&amp; v) : x( v.x ) {}
<a name="l00713"></a>00713 
<a name="l00717"></a><a class="code" href="structnih_1_1_dynamic__vector.html#a767e2ada4f59a2109a8a09fa2e46565f">00717</a>         NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector</a>&amp; <a class="code" href="structnih_1_1_dynamic__vector.html#a767e2ada4f59a2109a8a09fa2e46565f">operator=</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector</a>&amp; v)
<a name="l00718"></a>00718         {
<a name="l00719"></a>00719         x = v.x;
<a name="l00720"></a>00720                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00721"></a>00721         }
<a name="l00722"></a>00722 
<a name="l00726"></a><a class="code" href="structnih_1_1_dynamic__vector.html#a747ac892d8de76ec66ab438bd0b2d750">00726</a>     NIH_HOST FORCE_INLINE <span class="keyword">const</span> T&amp; <a class="code" href="structnih_1_1_dynamic__vector.html#a747ac892d8de76ec66ab438bd0b2d750">operator[]</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> i)<span class="keyword"> const   </span>{ <span class="keywordflow">return</span> x[i]; }
<a name="l00730"></a><a class="code" href="structnih_1_1_dynamic__vector.html#a0a296aca69ad2bf09ced18704de786f5">00730</a>     NIH_HOST FORCE_INLINE T&amp;       <a class="code" href="structnih_1_1_dynamic__vector.html#a0a296aca69ad2bf09ced18704de786f5">operator[]</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> i)         { <span class="keywordflow">return</span> x[i]; }
<a name="l00731"></a>00731 
<a name="l00734"></a><a class="code" href="structnih_1_1_dynamic__vector.html#a91342bd1d155e5863091fa57380604b9">00734</a>         NIH_HOST FORCE_INLINE <span class="keywordtype">size_t</span> <a class="code" href="structnih_1_1_dynamic__vector.html#a91342bd1d155e5863091fa57380604b9">dimension</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> x.size(); }
<a name="l00735"></a>00735 
<a name="l00739"></a><a class="code" href="structnih_1_1_dynamic__vector.html#a25911ca1ee9497526cd97c6736adb6b1">00739</a>     NIH_HOST <span class="keywordtype">void</span> <a class="code" href="structnih_1_1_dynamic__vector.html#a25911ca1ee9497526cd97c6736adb6b1">resize</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> n) { x.resize(n); }
<a name="l00740"></a>00740 
<a name="l00741"></a>00741     std::vector&lt;T&gt; x;
<a name="l00742"></a>00742 };
<a name="l00743"></a>00743 
<a name="l00744"></a>00744 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00745"></a><a class="code" href="structnih_1_1_vector__traits_3_01_dynamic__vector_3_01_t_01_4_01_4.html">00745</a> <span class="keyword">struct </span><a class="code" href="structnih_1_1_vector__traits.html">Vector_traits</a>&lt; <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector</a>&lt;T&gt; &gt;
<a name="l00746"></a>00746 {
<a name="l00747"></a>00747         <span class="keyword">typedef</span> T Field_type;
<a name="l00748"></a>00748     <span class="keyword">typedef</span> T value_type;
<a name="l00749"></a>00749 };
<a name="l00750"></a>00750 
<a name="l00751"></a>00751 
<a name="l00752"></a>00752 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00753"></a>00753 NIH_HOST <span class="keywordtype">bool</span> <a class="code" href="group__vectors.html#gaabd17838f41c1637cb84a3cfe31dfb0b">operator==</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op1, <span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op2);
<a name="l00754"></a>00754 
<a name="l00755"></a>00755 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> DIM&gt;
<a name="l00756"></a>00756 NIH_HOST <span class="keywordtype">bool</span> <a class="code" href="group__vectors.html#ga884852dfe6e126e524af6c966fd3fa8e">operator!=</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op1, <span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op2);
<a name="l00757"></a>00757 
<a name="l00758"></a>00758 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00759"></a>00759 NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a> operator*(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op1, <span class="keyword">const</span> T op2);
<a name="l00760"></a>00760 
<a name="l00761"></a>00761 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00762"></a>00762 NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a> <a class="code" href="group__vectors.html#gafe00990ed787cec75b986c394b7f5e0f">operator/</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op1, <span class="keyword">const</span> T op2);
<a name="l00763"></a>00763 
<a name="l00764"></a>00764 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00765"></a>00765 NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a> operator*(<span class="keyword">const</span> T op1, <span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op2);
<a name="l00766"></a>00766 
<a name="l00767"></a>00767 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00768"></a>00768 NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; <a class="code" href="group__vectors.html#gabaaa34dafadbdbaaff130b02d28b3ad1">operator*=</a>(<a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op1, <span class="keyword">const</span> T op2);
<a name="l00769"></a>00769 
<a name="l00770"></a>00770 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00771"></a>00771 NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a> <a class="code" href="group__vectors.html#ga9235b9ea803b8d0ef379565a3ff7dd76">operator+</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op1, <span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op2);
<a name="l00772"></a>00772 
<a name="l00773"></a>00773 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00774"></a>00774 NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a> <a class="code" href="group__vectors.html#ga8782aba246b1da852d9f4390d22336f8">operator-</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op1, <span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op2);
<a name="l00775"></a>00775 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00776"></a>00776 NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a> operator*(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op1, <span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op2);
<a name="l00777"></a>00777 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00778"></a>00778 NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a> <a class="code" href="group__vectors.html#gafe00990ed787cec75b986c394b7f5e0f">operator/</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op1, <span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op2);
<a name="l00779"></a>00779 
<a name="l00780"></a>00780 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00781"></a>00781 NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; <a class="code" href="group__vectors.html#ga4226e5c3bf0305cf0a0459bf43564223">operator+=</a>(<a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op1, <span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op2);
<a name="l00782"></a>00782 
<a name="l00783"></a>00783 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00784"></a>00784 NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; <a class="code" href="group__vectors.html#ga6c534bcb2f6acc627ea0988b2de4f73e">operator-=</a>(<a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op1, <span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op2);
<a name="l00785"></a>00785 
<a name="l00786"></a>00786 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00787"></a>00787 NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; <a class="code" href="group__vectors.html#gabaaa34dafadbdbaaff130b02d28b3ad1">operator*=</a>(<a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op1, <span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op2);
<a name="l00788"></a>00788 
<a name="l00789"></a>00789 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00790"></a>00790 NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; <a class="code" href="group__vectors.html#ga04e63000d70a03c13098b6b7303a29e9">operator/=</a>(<a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op1, <span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op2);
<a name="l00791"></a>00791 
<a name="l00792"></a>00792 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00793"></a>00793 NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; <a class="code" href="group__vectors.html#ga04e63000d70a03c13098b6b7303a29e9">operator/=</a>(<a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op1, <span class="keyword">const</span> T op2);
<a name="l00794"></a>00794 
<a name="l00795"></a>00795 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00796"></a>00796 NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a> <a class="code" href="group__vectors.html#ga8782aba246b1da852d9f4390d22336f8">operator-</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op1);
<a name="l00797"></a>00797 
<a name="l00798"></a>00798 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00799"></a>00799 NIH_HOST FORCE_INLINE T <a class="code" href="group__vectors.html#ga0de5bc91fec52d0b92e059ebf5d389ec">intensity</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; v);
<a name="l00800"></a>00800 
<a name="l00801"></a>00801 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00802"></a>00802 NIH_HOST FORCE_INLINE T <a class="code" href="group__vectors.html#ga299bb7e770db20680a383864db4bd843">dot</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op1, <span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op2);
<a name="l00803"></a>00803 
<a name="l00804"></a>00804 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00805"></a>00805 NIH_HOST FORCE_INLINE T <a class="code" href="group__vectors.html#gaef3221bb95a71d1743f7df1673082cbf">norm</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op);
<a name="l00806"></a>00806 
<a name="l00807"></a>00807 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00808"></a>00808 NIH_HOST FORCE_INLINE T <a class="code" href="group__vectors.html#ga9c4ac20ce07631b820678349b4c46698">sq_norm</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; op);
<a name="l00809"></a>00809 
<a name="l00810"></a>00810 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00811"></a>00811 NIH_HOST FORCE_INLINE <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a> <a class="code" href="group__vectors.html#gae244399ef06f44b09f0a908aa406c037">normalize</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a> v);
<a name="l00812"></a>00812 
<a name="l00813"></a>00813 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00814"></a>00814 NIH_HOST FORCE_INLINE T <a class="code" href="group__vectors.html#gab4b34a60142a60bb290dfba1709c85f4">max_comp</a>(<span class="keyword">const</span> <a class="code" href="structnih_1_1_dynamic__vector.html">Dynamic_vector&lt;T&gt;</a>&amp; v);
<a name="l00815"></a>00815 
<a name="l00819"></a>00819 } <span class="comment">// namespace nih</span>
<a name="l00820"></a>00820 
<a name="l00821"></a>00821 <span class="preprocessor">#include &lt;nih/linalg/vector_inline.h&gt;</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="vector_8h.html">vector.h</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Generated on Thu Dec 15 2011 11:56:19 for nih by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
